package yang.learn.service.impl;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yang.learn.dao.ChatRecordDao;
import yang.learn.entity.ChatRecord;
import yang.learn.service.ChatRecordService;

import java.util.List;

@Service
public class ChatRecordServiceImpl implements ChatRecordService {

    @Autowired(required = false)
    private ChatRecordDao chatRecordDao;

    @Override
    public void add(ChatRecord chatRecord) {
        chatRecordDao.add(chatRecord);
    }

    @Override
    public void del(ChatRecord chatRecord) {
        chatRecordDao.del(chatRecord);
    }

    @Override
    public void change(ChatRecord chatRecord) {
//        chatRecordDao.change(chatRecord);

    }

    public List<ChatRecord> queryAll(ChatRecord chatRecord){
        List<ChatRecord> list = chatRecordDao.queryAll(chatRecord);
        return list;
    }

    @Override
    public ChatRecord query(ChatRecord chatRecord) {
        chatRecord = chatRecordDao.query(chatRecord);
        return chatRecord;
    }

}
